<?php
	header('Content-type: text/json');
	header('Content-type: application/json');
	
	require_once("request.php");
	$param['username']=$_POST['username'];
	$param['password']=$_POST['password'];
	
	send_api_request("user.logout","{}");
	
	$json_data = send_api_request("user.login",json_encode($param));
	
	$data=json_decode($json_data);
	
	$result['status']=(($data->result)==="Wrong username or password.")?"failed":"successful";
	
	echo json_encode($result);
?>